package org.yijiaganxi.common.entity.banner;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 轮播管理
 * </p>
 *
 * @author zhangguowei123
 * @since 2020-08-29
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "yjgx_banner")
public class YjgxBanner implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;
    @TableField("createDate")
    private Date createDate;
    @TableField("modifyDate")
    private Date modifyDate;
    @TableField("createUser")
    private String createUser;
    @TableField("modifyUser")
    private String modifyUser;
    /**
     * 轮播名
     */
    @NotBlank(message = "轮播名字能为空")
    private String nam;
    /**
     * 图片地址
     */
    @NotBlank(message = "轮播图片地址能为空")
    @TableField("imgUrl")
    private String imgUrl;
    /**
     * 链接地址
     */
    @TableField("linkUrl")
    private String linkUrl;
    /**
     * 排序字段  越小优先显示
     */
    private Integer sort;
    /**
     * 状态  0停用  1使用
     */
    private Integer status;
    /**
     * 轮播位置  0首页 1广告位置  2列表位置
     */
    @NotNull( message = "轮播位置能为空")
    private Integer location;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser;
    }

    public String getNam() {
        return nam;
    }

    public void setNam(String nam) {
        this.nam = nam;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getLocation() {
        return location;
    }

    public void setLocation(Integer location) {
        this.location = location;
    }

    @Override
    public String toString() {
        return "YjgxBanner{" +
        "id=" + id +
        ", createDate=" + createDate +
        ", modifyDate=" + modifyDate +
        ", createUser=" + createUser +
        ", modifyUser=" + modifyUser +
        ", nam=" + nam +
        ", imgUrl=" + imgUrl +
        ", linkUrl=" + linkUrl +
        ", sort=" + sort +
        ", status=" + status +
        ", location=" + location +
        "}";
    }
}
